package com.googlecode.garbagecan.cxfstudy.type.sample2;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class UserServiceImpl implements UserService {

	public List<User> getUserList() {
		List<User> userList = new ArrayList<User>();
		for (int i = 0; i < 10; i++) {
			User user = new User();
			user.setId("" + i);
			user.setName("user_" + i);
			user.setPassword("password_" + i);
			userList.add(user);
		}
		return userList;
	}

	public Map<String, User> getUserMap() {
		Map<String, User> userMap = new LinkedHashMap<String, User>();
		for (int i = 0; i < 10; i++) {
			User user = new User();
			user.setId("" + i);
			user.setName("user_" + i);
			user.setPassword("password_" + i);
			userMap.put(user.getId(), user);
		}
		return userMap;
	}
}
